#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QGraphicsPixmapItem>
#include<QFileDialog>
#include <QInputDialog>
#include<QStandardPaths>
#include"Image.h"
#include<string>
#include <QGraphicsScene>
#include<QGraphicsPixmapItem>
#include<QGraphicsScene>
#include<QPainter>
#include<QPoint>
#include<QLabel>
#include <QMessageBox>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

    Image* imgleft;
    Image* imgright;

    void showImage();//此函数为在右边画布显示更改后的图像
private slots:
    void on_actionOpenImage_triggered();

    void on_actionFlip_triggered();

    void on_actionupdown_triggered();

    void on_actionleftdown_triggered();

    void on_actionMeanFilter_triggered();

    void on_actionMedianFilter_triggered();

    void on_actionSobel_triggered();

    void on_actionPrewitt_triggered();

    void on_pushButton_clicked();

    void on_actionruihua_triggered();

    void on_actionshun_triggered();

    void on_actionSaveimage_triggered();

    void on_actionleng_triggered();

    void on_actionnuan_triggered();

    void on_actionCut_triggered();

    void on_actionheibai_triggered();

    void on_actionhuidu_triggered();

    void on_actionliangdu_triggered();

    void on_actionduibidu_triggered();

    void on_actionleng_2_triggered();

    void on_actionnuan_2_triggered();

    void on_actionleft_triggered();

    void on_actionright_triggered();

    void on_actionup_triggered();

    void on_actiondown_triggered();

    void on_actionaoxian_triggered();

    void on_actiontuchu_triggered();

    void on_actionyuhua_2_triggered();

    void on_actionabout_triggered();

    void on_actionni_triggered();

private:
    QAction *finalEx;

    Ui::MainWindow  *ui;
    QGraphicsScene  *leftScene;
    QGraphicsScene  *rightScene;
    QGraphicsPixmapItem* leftPixmapItem;
    QGraphicsPixmapItem* rightPixmapItem;

    QLabel          *size;

    QFileInfo *info;

    QString getUserName();
    QString getUserPath();





};
#endif // MAINWINDOW_H
